<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DI_SINGLEBOX</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DI_SINGLEBOX</h1>
<div class=navbar>
<a href="../../index.html">main</a> |
<a href="../index.html">Dialog API</a> |
<a href="index.html">Dialog items</a><br>
</div>

<div class=shortdescr>The <dfn>DI_SINGLEBOX</dfn> dialog item describes a single line frame.<br>
</div>

<pre class=syntax>
struct FarDialogItem
{
  int Type          = <b>DI_SINGLEBOX</b>
  int X1            = <b>X1</b>
  int Y1            = <b>Y1</b>
  int X2            = <b>X2</b>
  int Y2            = <b>Y2</b>
  int Focus         = <b>0</b>
  int Selected      = <b>0</b>
  DWORD Flags       = <b>Flags</b>
  int DefaultButton = <b>0</b>
  char Data[512]    = <b>Caption</b>
};
</pre>
<p class=note><img src="../../../images/note.gif" alt="Attention!" width="10" height="10"> Attention!</p>
<UL class=note>
  <LI>This is an exemplary structure; read full description <a href="../structures/fardialogitem.html">here</a>.</LI>
</UL>

<h3>Flags</h3>
<div class=descr>
There are several flags applicable to the <dfn>DI_SINGLEBOX</dfn> control:<br>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Flag</th><th class="cont" width="60%">Description</th></tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_setcolor.html">DIF_SETCOLOR</a></td>
 <td class="cont" width="60%">
 The low byte of Flags will be used as the frame color.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_lefttext.html">DIF_LEFTTEXT</a></td>
 <td class="cont" width="60%">
 The caption of the frame will be left aligned.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_showampersand.html">DIF_SHOWAMPERSAND</a></td>
 <td class="cont" width="60%">
 Show ampersand symbol in caption instead of using it for defining hotkeys.</td>
 </tr>
</table>
</div>

<h3>Events</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Event</th><th class="cont" width="60%">Description</th></tr>

 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_drawdlgitem.html">DN_DRAWDLGITEM</a></td>
 <td class="cont" width="60%">This event is sent to the dialog callback function before the double line box is drawn.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_ctlcolordlgitem.html">DN_CTLCOLORDLGITEM</a></td>
 <td class="cont" width="60%">Plugin should pass the color attributes of the frame when this event comes. Param2 parameter:
   <pre>LoWord LoByte - color of text in the caption
                (<a href="../../defs/farcolors.html#COL_WARNDIALOGBOXTITLE">COL_WARNDIALOGBOXTITLE</a> or
                 <a href="../../defs/farcolors.html#COL_DIALOGBOXTITLE">COL_DIALOGBOXTITLE</a>)
LoWord HiByte - color of highlighted text in the caption
                (<a href="../../defs/farcolors.html#COL_WARNDIALOGHIGHLIGHTBOXTITLE">COL_WARNDIALOGHIGHLIGHTBOXTITLE</a> or
                 <a href="../../defs/farcolors.html#COL_DIALOGHIGHLIGHTBOXTITLE">COL_DIALOGHIGHLIGHTBOXTITLE</a>)
HiWord LoByte - color of the frame lines
                (<a href="../../defs/farcolors.html#COL_WARNDIALOGBOX">COL_WARNDIALOGBOX</a> or <a href="../../defs/farcolors.html#COL_DIALOGBOX">COL_DIALOGBOX</a>)
HiWord HiByte - 0 (not used)
   </pre>
 </td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_hotkey.html">DN_HOTKEY</a></td>
 <td class="cont" width="60%">Hotkey was pressed (Alt-&lt;letter&gt;).</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_mouseclick.html">DN_MOUSECLICK</a></td>
 <td class="cont" width="60%">This event comes after the user has clicked one of the dialog items or outside the dialog with the mouse button.</td>
 </tr>
</table>

</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>If this item is the first in the dialog items array, its caption is copied into the FAR console
window title.</li>
<li>When X1==X2 or Y1==Y2, a line (vertical or horizontal) will be drawn instead of a frame.</li>
</ol>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="di_vtext.html">DI_DOUBLEBOX</a>,
<a href="../structures/fardialogitem.html">FarDialogItem</a>

</div>

</body>
</html>
